package reflect;

import java.lang.reflect.Field;
import java.util.Scanner;
/*无参*/
public class reflectDemo2 {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchFieldException{
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入：");
        String next = scanner.next();

        Class personClass = Class.forName(next);
        Object o = personClass.newInstance();
        System.out.println(o);




    }
}
